# $Id$
# Maintainer:  Jan de Groot <jan@archlinux.org>

pkgname=gnome-desktop
pkgver=3.26.1
pkgrel=1
epoch=1
pkgdesc="Library with common API for various GNOME modules"
url="https://git.gnome.org/browse/gnome-desktop"
arch=(i686 x86_64)
license=(GPL LGPL)
depends=(gsettings-desktop-schemas gtk3 libxkbfile xkeyboard-config iso-codes libseccomp bubblewrap)
makedepends=(intltool gobject-introspection git gnome-common gtk-doc)
_commit=8fe92470af3dab7027a8689a889a0e1032e4411d  # tags/3.26.1^0
source=("git+https://git.gnome.org/browse/gnome-desktop#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --libexecdir=/usr/lib --disable-static --enable-gtk-doc \
    --with-gnome-distributor="Arch Linux"
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
